<div class="container" style="width:100%;margin-top:15px;">
  <div class="subnav org-toolbar">
    <div class="batch-middle right">
      <a href="javascript:void(0);" class="btn btn-primary" ng-click="show_batch_modal()">
        <i class="glyphicon glyphicon-plus"></i>
        {{ "application.people.CREATE_SERVICE_USER_TAG" | translate }}
      </a>
    </div>
    <div class="left non-admin-search">
      <div class="auto-search-group">
        <input class="subnav-search-input input-contrast auto-search-input" type="text" name="query" ng-model="search_value" ng-change="page_app_user(newPageNumber)" placeholder="{{ 'application.people.SEARCH_TAG' | translate }}..." autocomplete="off">
        <i class="glyphicon glyphicon-search"></i>
      </div>
    </div>
  </div>
  <div class="table-list-header">
    <label class="table-list-header-select-all">
      <input type="checkbox" id="select-all-checkbox" ng-model="selectedAll" ng-click="checkAll()">
    </label>
    <label for="select-all-checkbox" class="table-list-header-meta member-list-select-all-label">
      <span>{{ "application.people.SELECT_ALL_TAG" | translate }}</span>
    </label>
    <div class="member-toolbar-actions right" ng-show="should_show_remove_button()">
      <a href="javascript:void(0);" class="btn btn-sm btn-danger" ng-click="show_remove_modal()">{{ "application.people.REMOVE_SERVICE_USER_TAG" | translate }}</a>
    </div>
  </div>

  <div id="org-members">
    <ul class="member-listing table-list table-list-bordered adminable">
      <li class="table-list-item member-list-item" dir-paginate="member in group | itemsPerPage: items_per_page" current-page="page_number" total-items="total_items">
        <!--      <li class="table-list-item member-list-item" ng-repeat="member in group"> -->
        <div class="table-list-cell table-list-cell-checkbox">
          <input type="checkbox" class="js-check-all-item js-org-person-toggle" ng-model="member.selected" ng-disabled="member.is_owner_user==1">
        </div>

        <div class="table-list-cell member-info">
          <!-- <img alt="{{member.device_user_fullname}}" class="avatar member-list-avatar" height="48" ng-src="{{member.device_user_icon?'/icon/'+member.device_user_icon:'/static/yvertical/img/default-app.png'}}" width="48"> -->
          <span class="member-link css-truncate">
            <strong class="member-username css-truncate-target">{{member.user_fullname}}</strong>
          </span>
        </div>

        <div class="member-meta table-list-cell" style="font-size:15px;" ng-show="{{member.is_owner_user==1}}">
          {{ "application.people.OWNER_TAG" | translate }}
        </div>
        <div class="member-meta table-list-cell" style="font-size:15px;" ng-show="{{!member.is_owner_user==1}}">
          {{ "application.people.SERVICE_USER_TAG" | translate }}
        </div>

        <div class="member-meta table-list-cell" style="font-size:15px;padding-left:0">
          {{email_handler(member.user_email)}}
        </div>
        
      </li>
    </ul>
    <div class="paginate-container">
      <dir-pagination-controls auto-hide="false" boundary-links="true" on-page-change="page_app_user(newPageNumber)" template-url="/user/static/bower_components/angular-utils-pagination/dirPagination.tpl.html">
      </dir-pagination-controls>
    </div>
  </div>
</div>
<div class="modal fade" id="remove_user">
  <div class="modal-dialog" style="margin-top: 300px;width: 600px;">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title"><strong>{{ "application.people.REMOVE_SERVICE_USER_TAG" | translate }}</strong></h4>
      </div>
      <div class="modal-body" style="color: #D03F3F;">
        <p>该操作会移除您选定的客服人员：</p>
        <p ng-repeat="user in to_be_removed_users" style="color: #000000;"> {{ user.user_fullname }} </p> 
        <p>如有疑问请查看我们的文档或论坛信息.</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-dismiss="modal">{{ "application.people.CANCEL_TAG" | translate }}</button>
        <button type="button" class="btn btn-danger" style="background-image: linear-gradient(#C16552, #E24215);"
                ng-click="remove_users(to_be_removed_users)">{{ "application.people.OK_TAG" | translate }}</button>
      </div>
    </div>
  </div>
</div>
<div class="modal fade" id="batch_create_user" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document" style="top: 150px;" >
    <div class="modal-content" >
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">
          <strong>{{ "application.people.CREATE_SERVICE_USER_TAG" | translate }}</strong>
        </h4>
      </div>
      <div class="modal-body">
        <span class="modal-body-email-h">{{ "application.people.SERVICE_USER_NAME_TAG" | translate }}:</span>
        <input type="text" class="modal-body-email-b" ng-model="create_user_direct.name" tabindex="1" />
        <span class="modal-body-email-bb">*</span>
        <span class="modal-body-email-note" id="cud1" > {{ create_user_direct.name_error }} </span>
      </div>
      <div class="modal-body">
        <span class="modal-body-email-h">{{ "application.people.SERVICE_USER_EMAIL_TAG" | translate }}:</span>
        <input type="text" class="modal-body-email-b" placeholder="example@ppmessage.cn" ng-model="create_user_direct.email" tabindex="2" />
        <span class="modal-body-email-bb">*</span>
        <span class="modal-body-email-note" id="cud2"> {{ create_user_direct.email_error }} </span>
      </div>
      <div class="modal-body">
        <span class="modal-body-email-h">{{ "application.people.PASSWORD_TAG" | translate }}:</span>
        <input type="password" class="modal-body-email-b" ng-model="create_user_direct.password" tabindex="3" />
        <span class="modal-body-email-bb">*</span>
        <span class="modal-body-email-note" id="cud3"> {{ create_user_direct.password_error }} </span>
      </div>
      <div class="modal-body">
        <span class="modal-body-email-h">{{ "application.people.CONFIRM_PASSWORD_TAG" | translate }}:</span>
        <input type="password" class="modal-body-email-b" ng-model="create_user_direct.password_repeat" tabindex="4" />
        <span class="modal-body-email-bb">*</span>
        <span class="modal-body-email-note" id="cud4"> {{ create_user_direct.password_repeat_error }} </span>
      </div>
      <div class="modal-footer">
        <button type="submit" class="btn btn-primary" ng-click="create_user_directly()" tabindex="5">{{ "application.people.CREATE_TAG" | translate }}</button>
      </div>
    </div>
  </div>
</div>

